<?php include "conexao.php";
$ip=getenv("REMOTE_ADDR");
if($_COOKIE["cookiecontagem"]==""){ print "<script type = 'text/javascript'> location.href = 'index.php'</script>"; exit();}
?>
<script type="text/javascript" src="admin/jscripts/tiny_mce/tiny_mce.js" charset="utf-8"></script>

<script language="javascript" type="text/javascript">
      tinyMCE.init({
         mode : "textareas",
         theme : "advanced",
		
		 theme_advanced_buttons2 : "image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		 
		 theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "center",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,

      });
   </script>
   <script type="text/javascript">
   function critica4()
			 {
			 
			  if(document.form3.nome.value ==""){
	   
	    alert("Preencha o campo Nome !");
		document.form3.nome.focus();
		return(false);
	  }
			 if(document.form3.email.value.indexOf('@') == -1 || document.form3._email.value.indexOf('.') == -1){
	   
	    alert("Email incorreto");
		document.form3.email.focus();
		return(false);
	  }
	   if(document.form3.ddd.value ==""){
	   
	    alert("Preencha o campo ddd !");
		document.form3.ddd.focus();
		return(false);
	  }
	   if(document.form3.fone.value ==""){
	   
	    alert("Preencha o campo Telefone !");
		document.form3.fone.focus();
		return(false);
	  }
	   
	
	 return(true);
   }
   </script>
   <style type="text/css">
   body {
	margin:0px;
	background-image:url(imagens/fading_background_20.png);
		font-size:12px;
}
   </style>
<br><br>
<?php if($_GET["public"]==""){?>
              <table width="400" border="0">
  <tr>
    <td> <form  id="form3" name="form3" action="op_contato.php" method="post" onsubmit="return critica4();">
      <table width="400" border="0">
        <tr>
          <td width="69">Nome:</td>
          <td colspan="2"><input name="nome" id="nome" type="text" /></td>
        </tr>
        <tr>
          <td>Email:</td>
          <td colspan="2"><input name="email" id="email" type="text" /></td>
        </tr>
        <tr>
          <td>Ddd/Telefone:</td>
          <td width="54"><input name="ddd" type="text" id="ddd" size="5" /></td>
          <td width="263"><input name="fone" type="text" id="fone" size="18" maxlength="8" /></td>
        </tr>
        <tr>
          <td>Mensagem:</td>
          <td colspan="2"><textarea name="mensagem" id="mensagem" cols="40" rows="5"></textarea></td>
        </tr>
        <tr>
          <td colspan="3"><input type="submit" value="Enviar" />
            <input name="acao" type="hidden" id="acao" value="inserir" />                  </td>
        </tr>
        <tr>
          <td colspan="3"><p>&nbsp;</p>
            <p>Seu ip &eacute;: <?php echo getenv("REMOTE_ADDR"); ?></p></td>
        </tr>
      </table>
        </form>
    </td>
  </tr>
</table><?php }else{echo "<font color=green><h2>Recado inserido com sucesso, apos avalia&ccedil;&atilde;o ele ser&aacute; publicado</h2></font>";}?>